package client;

import java.awt.Color;
import java.util.Vector;

/**
 * Objekat ove klase predstavlja logovanog korisnika.
 * 
 * @author UrosKrkic & Radivoje Popovic
 */
public class ClientUser {
	
	/**
	 * Username logovanog korisnika.
	 */
	private String username;
	
	/**
	 * Password logovanog korisnka.
	 */
	private String password;
	
	/**
	 * Nickname logovanog korisnika.
	 */
	private String nickname;
	
	/**
	 * Email logovanog korisnka.
	 */
	private String email;
	
	/**
	 * Status logovanog korisnika.
	 */
	private int status;
	
	/**
	 * Datum registarcije logovanog korisnika.
	 */
	private String regDate;
	
	/**
	 * Avatar logovanog korisnika.
	 */
	private String avatar;
	
	
	/**
	 * Public IP adresa.
	 * U slucaju da je server u lokalu, onda ce ovo biti lokalna adresa klijenta.
	 */
	private String publicIP;
	
	
	private String fontName;
	private int fontStyle;
	private int fontSize;
	private Color fontColor;
	private Color backgroundColor;
	
	
	/**
	 * Block lista.
	 */
	private Vector<String> blockList;
	

	
	/**
	 * Konstruktor.
	 * @author UrosKrkic & Radivoje Popovic
	 */
	public ClientUser() {
		blockList = new Vector<String>();
	}

	
	
	/**
	 * Metod dodaje korisnika u listu blokiranih korisnika.
	 * @param user - user koji se dodaje (blokira)
	 * @author UrosKrkic & Radivoje Popovic
	 */
	public void addToBlockList(String user) {
		blockList.add(user);
	}
	
	
	/**
	 * Metod uklanja korisnika iz liste blokiranih korisnika.
	 * @param user - korisnik koji se uklanja (deblokira)
	 * @author UrosKrkic & Radivoje Popovic
	 */
	public void removeFromBlockList(String user) {
		blockList.remove(user);
	}
	
	
	/**
	 * Vraca flag da li je user blokiran.
	 * @param user - korisnik za kog se proverava da li je blokiran
	 * @return true, ako je blokiran, inace false
	 * @author UrosKrkic & Radivoje Popovic
	 */
	public boolean isBlocked(String user) {
		return blockList.contains(user);
	}
	
	
	/**
	 * Metod vraca block listu.
	 * @return - block lista
	 * @author UrosKrkic & Radivoje Popovic
	 */
	public Vector<String> getBlockList() {
		return this.blockList;
	}
	
	
	// getter i setter metode

	public String getAvatar() {
		return avatar;
	}


	public void setAvatar(String avatar) {
		this.avatar = avatar;
	}


	public String getEmail() {
		return email;
	}


	public void setEmail(String email) {
		this.email = email;
	}


	public String getNickname() {
		return nickname;
	}


	public void setNickname(String nickname) {
		this.nickname = nickname;
	}


	public int getStatus() {
		return status;
	}


	public void setStatus(int status) {
		this.status = status;
	}


	public String getUsername() {
		return username;
	}


	public void setUsername(String username) {
		this.username = username;
	}


	public String getPassword() {
		return password;
	}


	public void setPassword(String password) {
		this.password = password;
	}


	public String getRegDate() {
		return regDate;
	}


	public void setRegDate(String regDate) {
		this.regDate = regDate;
	}



	public Color getFontColor() {
		return fontColor;
	}



	public void setFontColor(Color fontColor) {
		this.fontColor = fontColor;
	}



	public String getFontName() {
		return fontName;
	}



	public void setFontName(String fontName) {
		this.fontName = fontName;
	}



	public int getFontSize() {
		return fontSize;
	}



	public void setFontSize(int fontSize) {
		this.fontSize = fontSize;
	}



	public int getFontStyle() {
		return fontStyle;
	}



	public void setFontStyle(int fontStyle) {
		this.fontStyle = fontStyle;
	}



	public Color getBackgroundColor() {
		return backgroundColor;
	}



	public void setBackgroundColor(Color backgroundColor) {
		this.backgroundColor = backgroundColor;
	}



	public String getPublicIP() {
		return publicIP;
	}



	public void setPublicIP(String publicIP) {
		this.publicIP = publicIP;
	}
	

}
